package com.bicon.botu.mall.component.component;

import com.bicon.botu.mall.component.service.impl.HistorySearchServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author 谈东魁
 * @date 2017/9/12 0012 上午 9:52
 */
@Component
public class BaseAsyncTask {

    @Autowired
    HistorySearchServiceImpl historySearchService;

    @Async("saveSearchWordAsync")
    public void saveSearchWordAsync(String userId, String model, String searchWord, int total){
        historySearchService.add(userId, model, searchWord, total);
    }
}
